<?php
$T->loadTpl("./html/".$template."/".$qname.".html");
$T->SetTpl('cssjs','html/cssjs.inc'); 
$T->SetTpl('jsmodel','html/jsmodel.inc');     

$name=isset($_GET["name"])?$_GET["name"]:"";
        
$s_where="";
if(!empty($name)){
    $s_where=" and grpname like '%".$name."%'";
}
$T->Set("dname",$name);

if(!ckAdm()){
    $s_where=" and a.mech=".$_SESSION["school"]." ";
}

$T->SetBlock("list","select a.*,c.sch_name from sys_custom_group a left join sys_school c on a.mech=c.id where 1=1 ".$s_where." order by id desc ");  

$T->Set("template",$template);         
$T->clearNaN();       
$T->clearNoN();
$T->display(); 